<?php 
if (__FILE__ == '') {
	die('Fatal error ! Not exists __FILE__');
}
define('DEV_DEBUG',true);
define('ADMIN_DIR','eos');
define('INDEX_FLAG','index');

if (DEV_DEBUG) {
	error_reporting(E_ALL);
	@ini_set('display_errors', 1);
} else {
	error_reporting(E_ALL ^ E_NOTICE);
	@ini_set('display_errors', 0);
}

$server_control = isset($_GET['control']) ? $_GET['control'] : INDEX_FLAG;
$server_module = isset($_GET['module']) ? $_GET['module'] : INDEX_FLAG;

//设置默认目录
$work_dir = INDEX_FLAG;
if(strpos($_SERVER['REQUEST_URI'],'/'.ADMIN_DIR.'/')!==false){
	$work_dir = ADMIN_DIR;
	require 'includes/'.ADMIN_DIR.'/init.php';
}else{
	require 'includes/init.php';
}

new Route($server_module,$server_control,$work_dir);
?>